home *** CD-ROM | disk | FTP | other *** search
/ New Masters of Flash / New Masters of Flash.iso / pc / MOVIES / 14.dir / 00062_Text_text06.txt < prev    next >
Text File  |  2000-10-01  |  3KB  |  37 lines

  1. Bringing the logo to a halt during rollover.
  2.  
  3. When you move the mouse over the green button of the logo, the following script is executed:
  4.  
  5. vNewStrength = 0;
  6.     vNewAttract = 1;
  7.     vNewDamp = 0.7;
  8.     // 
  9. Comment: modify strength parameter in each movie clip.
  10.     ../G/bro:vGlobal_Strength = vNewStrength;
  11.     ../L/bro:vGlobal_Strength = vNewStrength;
  12.     ../O/bro:vGlobal_Strength = vNewStrength;
  13.     ../B/bro:vGlobal_Strength = vNewStrength;
  14.     ../Z/bro:vGlobal_Strength = vNewStrength;
  15.     // 
  16. Comment: modify attract parameter in each movie clip.
  17.     ../G/bro:vGlobal_attract = vNewAttract;
  18.     ../L/bro:vGlobal_attract = vNewAttract;
  19.     ../O/bro:vGlobal_attract = vNewAttract;
  20.     ../B/bro:vGlobal_attract = vNewAttract;
  21.     ../Z/bro:vGlobal_attract = vNewAttract;
  22.     // 
  23. Comment: modify damp parameter in each movie clip.
  24.     ../G/bro:vDamp = vNewDamp;
  25.     ../L/bro:vDamp = vNewDamp;
  26.     ../o/bro:vDamp = vNewDamp;
  27.     ../B/bro:vDamp = vNewDamp;
  28.     ../Z/bro:vDamp = vNewDamp;
  29. This modifies the variables strength, attract, and damp in the shaking behavior of each letter movie clip in the Logo. (This clip is called shaker in each letter). Setting brown to 0 completely cancels out the shaking effect. The letters return to normal with little or no wobbling. (damp viscosity is set to a high value).
  30.  
  31. A similar piece of code resets the original values for the three variables in the On (Roll Out) action. It uses the default values for the attraction and the Brownian Motion equations, and a much weaker viscosity value, so the letters become less responsive and appear to be slowing down.
  32. Once IΓÇÖd finished the coding for this effect, I played around with different values for the parameters until I found ones that I felt worked. This final tuning allows you to be really creative because, depending on the values of the parameters, you can get very different effects: heaviness, liveliness, rigidityΓǪ
  33.  
  34. I also found that if the letters get too big they can slow down the movie, or make the letters swap positions: so I imposed a limit on the _xscale and the _yscale that keeps these two properties between 0 and 500.
  35. The time spent testing also revealed some other, unexpected effects; if you move the mouse quickly over the green button, for example, it thrashes about and distorts violently. This animated logo seems to have been quite eye-catching, because IΓÇÖve had a lot of positive feedback from visitors to my site. Flashers have even asked about it on newsgroups - I hope this chapter has helped satisfy their curiosity.
  36. IΓÇÖve tried to show that  to create the effect you want, you need to plan and model before going ahead and implementing it. In this case I had to consider not only the properties, but also their relative rates of change. You also need to be pretty familiar with Flash before creating an effect. If you arenΓÇÖt sure about some effects, test them out first. Finally, IΓÇÖve found that it pays to make an effect re-usable by putting it into a clip of its own. Some quite complex effects work well because they have been made up out of several smaller effects that are used as the building blocks of a more complicated structure.
  37.